Integrand size = 21, antiderivative size = 148 \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=-\frac {3 a \text {arctanh}(\sin (c+d x))}{b^4 d}-\frac {3 \left (2 a^2+b^2\right ) \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{2 b^4 \sqrt {a^2+b^2} d}-\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2}+\frac {3 \sec (c+d x) (2 a+b \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.28, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3593, 747, 827, 858, 221, 739, 212} \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=-\frac {3 \left (2 a^2+b^2\right ) \sec (c+d x) \text {arctanh}\left (\frac {b-a \tan (c+d x)}{\sqrt {a^2+b^2} \sqrt {\sec ^2(c+d x)}}\right )}{2 b^4 d \sqrt {a^2+b^2} \sqrt {\sec ^2(c+d x)}}-\frac {3 a \sec (c+d x) \text {arcsinh}(\tan (c+d x))}{b^4 d \sqrt {\sec ^2(c+d x)}}+\frac {3 \sec (c+d x) (2 a+b \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))}-\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2} \]
[In]
[Out]
Rule 212
Rule 221
Rule 739
Rule 747
Rule 827
Rule 858
Rule 3593
Rubi steps \begin{align*} \text {integral}& = \frac {\sec (c+d x) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{3/2}}{(a+x)^3} \, dx,x,b \tan (c+d x)\right )}{b d \sqrt {\sec ^2(c+d x)}} \\ & = -\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2}+\frac {(3 \sec (c+d x)) \text {Subst}\left (\int \frac {x \sqrt {1+\frac {x^2}{b^2}}}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{2 b^3 d \sqrt {\sec ^2(c+d x)}} \\ & = -\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2}+\frac {3 \sec (c+d x) (2 a+b \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))}-\frac {(3 \sec (c+d x)) \text {Subst}\left (\int \frac {-2+\frac {4 a x}{b^2}}{(a+x) \sqrt {1+\frac {x^2}{b^2}}} \, dx,x,b \tan (c+d x)\right )}{4 b^3 d \sqrt {\sec ^2(c+d x)}} \\ & = -\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2}+\frac {3 \sec (c+d x) (2 a+b \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))}-\frac {(3 a \sec (c+d x)) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{b^2}}} \, dx,x,b \tan (c+d x)\right )}{b^5 d \sqrt {\sec ^2(c+d x)}}+\frac {\left (3 \left (1+\frac {2 a^2}{b^2}\right ) \sec (c+d x)\right ) \text {Subst}\left (\int \frac {1}{(a+x) \sqrt {1+\frac {x^2}{b^2}}} \, dx,x,b \tan (c+d x)\right )}{2 b^3 d \sqrt {\sec ^2(c+d x)}} \\ & = -\frac {3 a \text {arcsinh}(\tan (c+d x)) \sec (c+d x)}{b^4 d \sqrt {\sec ^2(c+d x)}}-\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2}+\frac {3 \sec (c+d x) (2 a+b \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))}-\frac {\left (3 \left (1+\frac {2 a^2}{b^2}\right ) \sec (c+d x)\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a^2}{b^2}-x^2} \, dx,x,\frac {1-\frac {a \tan (c+d x)}{b}}{\sqrt {\sec ^2(c+d x)}}\right )}{2 b^3 d \sqrt {\sec ^2(c+d x)}} \\ & = -\frac {3 a \text {arcsinh}(\tan (c+d x)) \sec (c+d x)}{b^4 d \sqrt {\sec ^2(c+d x)}}-\frac {3 \left (2 a^2+b^2\right ) \text {arctanh}\left (\frac {b \left (1-\frac {a \tan (c+d x)}{b}\right )}{\sqrt {a^2+b^2} \sqrt {\sec ^2(c+d x)}}\right ) \sec (c+d x)}{2 b^4 \sqrt {a^2+b^2} d \sqrt {\sec ^2(c+d x)}}-\frac {\sec ^3(c+d x)}{2 b d (a+b \tan (c+d x))^2}+\frac {3 \sec (c+d x) (2 a+b \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(396\) vs. \(2(148)=296\).
Time = 3.68 (sec) , antiderivative size = 396, normalized size of antiderivative = 2.68 \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=\frac {\sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \left (\frac {b^2 \left (a^2+b^2\right ) \sin (c+d x)}{a}+\frac {(2 a-b) b (2 a+b) (a \cos (c+d x)+b \sin (c+d x))}{a}+2 b (a \cos (c+d x)+b \sin (c+d x))^2+\frac {6 \left (2 a^2+b^2\right ) \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right ) (a \cos (c+d x)+b \sin (c+d x))^2}{\sqrt {a^2+b^2}}+6 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a \cos (c+d x)+b \sin (c+d x))^2-6 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) (a \cos (c+d x)+b \sin (c+d x))^2+\frac {2 b \sin \left (\frac {1}{2} (c+d x)\right ) (a \cos (c+d x)+b \sin (c+d x))^2}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}-\frac {2 b \sin \left (\frac {1}{2} (c+d x)\right ) (a \cos (c+d x)+b \sin (c+d x))^2}{\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )}\right )}{2 b^4 d (a+b \tan (c+d x))^3} \]
[In]
[Out]
Time = 94.52 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.82
method | result | size |
derivativedivides | \(\frac {\frac {1}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{4}}-\frac {2 \left (\frac {\frac {b^{2} \left (3 a^{2}-2 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {b \left (4 a^{4}-9 a^{2} b^{2}+2 b^{4}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2}}-\frac {b^{2} \left (13 a^{2}-2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-2 a^{2} b +\frac {b^{3}}{2}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}^{2}}-\frac {3 \left (2 a^{2}+b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{4}}-\frac {1}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{4}}}{d}\) | \(269\) |
default | \(\frac {\frac {1}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{4}}-\frac {2 \left (\frac {\frac {b^{2} \left (3 a^{2}-2 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {b \left (4 a^{4}-9 a^{2} b^{2}+2 b^{4}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2}}-\frac {b^{2} \left (13 a^{2}-2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-2 a^{2} b +\frac {b^{3}}{2}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}^{2}}-\frac {3 \left (2 a^{2}+b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{4}}-\frac {1}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{4}}}{d}\) | \(269\) |
risch | \(\frac {-9 i a b \,{\mathrm e}^{5 i \left (d x +c \right )}+6 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-3 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+12 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+9 i a b \,{\mathrm e}^{i \left (d x +c \right )}+6 a^{2} {\mathrm e}^{i \left (d x +c \right )}-3 b^{2} {\mathrm e}^{i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+a \,{\mathrm e}^{2 i \left (d x +c \right )}+i b +a \right )^{2} b^{3} d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,b^{4}}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d \,b^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right ) a^{2}}{\sqrt {a^{2}+b^{2}}\, d \,b^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}\, d \,b^{2}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right ) a^{2}}{\sqrt {a^{2}+b^{2}}\, d \,b^{4}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}\, d \,b^{2}}\) | \(403\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 513 vs. \(2 (138) = 276\).
Time = 0.34 (sec) , antiderivative size = 513, normalized size of antiderivative = 3.47 \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=\frac {4 \, a^{2} b^{3} + 4 \, b^{5} + 6 \, {\left (2 \, a^{4} b + a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{2} + 18 \, {\left (a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, {\left ({\left (2 \, a^{4} - a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (2 \, a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {a^{2} + b^{2}} \log \left (-\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) - 6 \, {\left ({\left (a^{5} - a b^{4}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (a^{4} b + a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 6 \, {\left ({\left (a^{5} - a b^{4}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (a^{4} b + a^{2} b^{3}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{4 \, {\left ({\left (a^{4} b^{4} - b^{8}\right )} d \cos \left (d x + c\right )^{3} + 2 \, {\left (a^{3} b^{5} + a b^{7}\right )} d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{2} b^{6} + b^{8}\right )} d \cos \left (d x + c\right )\right )}} \]
[In]
[Out]
\[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=\int \frac {\sec ^{5}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{3}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 518 vs. \(2 (138) = 276\).
Time = 0.34 (sec) , antiderivative size = 518, normalized size of antiderivative = 3.50 \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=\frac {\frac {2 \, {\left (6 \, a^{4} - a^{2} b^{2} + \frac {{\left (21 \, a^{3} b - 2 \, a b^{3}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, {\left (6 \, a^{4} - 9 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {4 \, {\left (6 \, a^{3} b - a b^{3}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {{\left (6 \, a^{4} - 9 \, a^{2} b^{2} + 2 \, b^{4}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {{\left (3 \, a^{3} b - 2 \, a b^{3}\right )} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{4} b^{3} + \frac {4 \, a^{3} b^{4} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {8 \, a^{3} b^{4} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {4 \, a^{3} b^{4} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {a^{4} b^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {{\left (3 \, a^{4} b^{3} - 4 \, a^{2} b^{5}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {{\left (3 \, a^{4} b^{3} - 4 \, a^{2} b^{5}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {6 \, a \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{4}} + \frac {6 \, a \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{4}} - \frac {3 \, {\left (2 \, a^{2} + b^{2}\right )} \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} b^{4}}}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (138) = 276\).
Time = 0.61 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.12 \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=-\frac {\frac {6 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{4}} - \frac {6 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{4}} + \frac {3 \, {\left (2 \, a^{2} + b^{2}\right )} \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} b^{4}} + \frac {4}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} b^{3}} + \frac {2 \, {\left (3 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 13 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a^{4} + a^{2} b^{2}\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a\right )}^{2} a^{2} b^{3}}}{2 \, d} \]
[In]
[Out]
Time = 6.48 (sec) , antiderivative size = 1311, normalized size of antiderivative = 8.86 \[ \int \frac {\sec ^5(c+d x)}{(a+b \tan (c+d x))^3} \, dx=\text {Too large to display} \]
[In]
[Out]